import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class TestImageWidget extends StatelessWidget {
  const TestImageWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("基础组件 图片及ICON 学习使用"),
      ),
      body: SingleChildScrollView(
        scrollDirection: Axis.vertical,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text("图片"),
            Image(
              image: AssetImage("images/ic_launcher.png"),
              width: 100.0,
            ),
            Image.asset(
              "images/ic_launcher.png",
              width: 200.0,
            ),
            Image(
              image: NetworkImage("https://book.flutterchina.club/assets/img/logo.png"),
              width: 100.0,
            ),
            Image.network(
              "https://book.flutterchina.club/assets/img/logo.png",
              width: 200.0,
            ),
            Text("图片属性:width:50.0、height:200.0"),
            Image(
              image: AssetImage("images/ic_launcher.png"),
              width: 50.0,
              height: 200.0,
            ),
            Text("图片属性 this.color, 图片的混合色值 , this.colorBlendMode, 混合模式"),
            Image(
              image: AssetImage("images/ic_launcher.png"),
              color: Colors.blueGrey,
              colorBlendMode: BlendMode.difference,
            ),
            Text("图片属性 fit,//缩放模式"),
            Image(
              image: AssetImage("images/ic_launcher.png"),
              fit: BoxFit.fill,
              width: 100.0,
              height: 200.0,
            ),
          ],
        ),
      ),
    );
  }
}
